package com.chatgpt_backend.entity.user;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
public class RegisterUser {
    private Integer id;
    @Pattern(regexp = "^[A-Za-z0-9一-龥]+$")
    @Length(max = 24)
    private String username;
    @Length(min = 6, max = 16)
    private String password;
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$")
    private String email;
    @Length(min = 6, max = 6)
    private String code;
}
